package com.hyopt.modules.app.service.impl;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hyopt.common.utils.QueryExt;
import com.hyopt.modules.app.dao.CoinDetailDao;
import com.hyopt.modules.app.entity.CoinDetailEntity;
import com.hyopt.modules.app.form.CoinDetailCount;
import com.hyopt.modules.app.service.CoinDetailService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * TODO UserService 实现类
 *
 * @author crazypenguin
 * @version 1.0.0
 * @createdate 2019/1/9
 */
@Service("coinDetailService")
@Slf4j
public class CoinDetailServiceImpl extends ServiceImpl<CoinDetailDao, CoinDetailEntity> implements CoinDetailService {



    @Override
    public List selectPageByConditions(Map map) {
        List list = this.baseMapper.selectByPhone(map);
        return list;
    }

    @Override
    public Page selectPageCoin(QueryExt query) {
        Map map  = new HashMap();
        map.putAll(query.getCondition());
        query.setRecords(this.baseMapper.selectPageCoin(query, map));
        return query;
    }

    @Override
    public CoinDetailCount selectCastCoinCounts(QueryExt query) {
        Map map  = new HashMap();
        map.putAll(query.getCondition());
        CoinDetailCount coinDetailCount = this.baseMapper.selectCastCoinCounts(query,map);
        return coinDetailCount;
    }

    @Override
    public Long selectGetCoinCounts(QueryExt query) {
        Map map  = new HashMap();
        map.putAll(query.getCondition());
        Long integer = this.baseMapper.selectGetCoinCounts(query, map);
        return integer;
    }



}
